/**
 * 引擎图层类型
 */
export enum APILayerType {
  BASE = 'base',
  SKYBOX = 'skybox', // 天空盒
  TERRAIN = 'terrain', // 高程
  GEOSERVER_WMS = 'geoServer_WMS',
  GEOSERVER_WMTS = 'geoServer_WMTS',
  ROAD = 'road', // 路
  RAILWAY = 'railway', // 铁路
  GREENLAND = 'greenLand', // 草地
  WATER = 'water', // 水
  BUILDING = 'building', // 建筑
  DYNAMIC_BUILDING = 'dynamic_building', // 动态建筑
  POI = 'POI',
  CIRCLEWAVE = 'circleWave', // 动态圆
  FLYLINE = 'flyline', // 飞线
  WALL = 'wall', // 墙
  MARKER = 'marker', // 标识
  LABEL = 'label', // 标签
  TRACK = 'track', // 用于时间控件
  POLYLINE = 'polyline', // 线// 线
  GLOWPOLYLINE = 'glowpolyline',
  BEZIERPOLYLINE = 'bezierpolyline', // 线
  BEZIERPOLYLINEVOLUME = 'bezierpolylinevolume', // 线
  TEXTUREPOLYLINE = 'texture_polyline', // 线
  GRADUALBOUNDARY = 'gradualboundary', // 渐变边界
  TREE = 'tree',
  VIDEO = 'video',
  POLYGON = 'polygon', // 面
  IMAGE = 'image', // 图片
  PIPE = 'pipe', // 管道
  MASK = 'mask', // 遮罩
  ARCGIS_MAPSERVER_2000 = 'arcgis_mapserver_2000', // 地图服务
  GLTFMODEL = 'gltfmodel', // gltf模型
  DIVTOOL = 'divTool',
  RECTANGLE = 'rectangle', // 矩形
  TILESET = 'tileset', // 倾斜
  BIMMODEL = 'bimModel', // bim模型
  PARTICLE = 'particle', // 粒子
  LABELMARKER = 'labelmarker', // 文本标识
  DRAWLABEL = 'drawlabel', // 标注工具
  TRANSFERLINE = 'transfer_line', // 转移线(引导线)
  PARTICLESYSTEM = 'particleSystem', // 粒子
  U3DPARTICLESYSTEM = 'u3d_particleSystem', // 粒子
  CIMPARTICLESYSTEM = 'cim_particleSystem', // 粒子
  FAKEPARTICLESYSTEM = 'fake_particleSystem', // 粒子
  PLANE = 'plane', // 用于放canvas面板
  ENTITY = 'entity', // ECS架构下的entity
  ARC = 'arc', // 圆
  GUIDINGLINE = 'guiding_line', // 引导线
  POINT = 'point', //  点
  CONTOUR = 'contour', // 轮廓
  GLTFMODELEFFECT = 'gltfmodeleffect',
  PARAMETER = 'parameter',
}

/**
 * 文件图层类型
 */
export enum FileLayerType {
  _3dm = 'GLTFMODEL',
  _3ds = 'GLTFMODEL',
  _3dxml = 'GLTFMODEL',
  dgn = 'GLTFMODEL',
  dxf = 'GLTFMODEL',
  fbx = 'GLTFMODEL',
  gltf = 'GLTFMODEL',
  gltfmodel = 'GLTFMODEL',
  ifc = 'GLTFMODEL',
  jlg = 'GLTFMODEL',
  nwd = 'GLTFMODEL',
  obj = 'GLTFMODEL',
  rvt = 'GLTFMODEL',
  skp = 'GLTFMODEL',
  stp_step = 'GLTFMODEL',
  osgb = 'TILESET',
  _3dtiles = 'TILESET',
  json = 'TILESET',
  POINT = 'LABEL',
  POLYLINE = 'TEXTURE_POLYLINE',
  POLYGON = 'POLYGON',
  tif_dom = 'TIFDOM',
  tif_dem = 'TIFDEM',
  img = 'IMAGE',
}

/**
 * Cimup 图层类型
 */
export const LayerType = (() => {
  const result: Record<string, string> = {};
  Object.entries(APILayerType).forEach(([key, value]) => {
    result[key] = value;
    result[value] = key;
  });

  return result;
})();
